package com.zzjson.job;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.example.quartz.jobs</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年12月04日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class HelloJob implements Job {

	public void execute(JobExecutionContext context) throws JobExecutionException {

		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		System.out.format(" %s helloJob execute  value is: \n", sf.format(new Date()));
		JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
		for (String s : jobDataMap.keySet()) {
			System.out.format("jobDataKey:%s, jobDataValue:%s ", s, jobDataMap.get(s));
		}
		System.out.println();

	}
}